package communicate.msn.with.java;

import java.io.File;

public class Recursion {
	public static void main(String args[]){
		listFile(new File("g://dir"));
	}
	public static void listFile(File f){
		if(f.isDirectory()){
			File[] files = f.listFiles();
			for(File file:files){
				if(file.isDirectory()){
					listFile(file);
				}else{
					System.out.println(file.getName());
				}
			}
			
		}else{
			System.out.println(f.getName());
		}
	}

}
